package com.c.ctgproject.wiget.dialog

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.c.ctgproject.base.BaseViewModel
import com.c.ctgproject.http.ApiMethods
import com.c.ctgproject.utils.awaitSync
import com.c.ctgproject.utils.launch

class InputReturnMessageViewModel : BaseViewModel() {

    private val mResult = MutableLiveData<String>()
    val result: LiveData<String> get() = mResult

    //收款方式 现金
    fun addReturnMessage(suborderId: String, message: String) {
        launch {
            mResult.value = ApiMethods.retrofit.serviceAddReturnMessage(
                suborderId, message
            ).awaitSync()
        }
    }


}